using Google.ProtocolBuffers;
using micromsg.Proto;
using System;
using System.CodeDom.Compiler;
using System.Diagnostics;
using System.IO;
using System.Runtime.CompilerServices;
namespace micromsg
{
	[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
	public sealed class QContact : GeneratedMessageLite<QContact, QContact.Builder>
	{
		[GeneratedCode("ProtoGen", "2.3.0.277"), DebuggerNonUserCode, CompilerGenerated]
		public sealed class Builder : GeneratedBuilderLite<QContact, QContact.Builder>
		{
			private bool resultIsReadOnly;
			private QContact result;
			protected override QContact.Builder ThisBuilder
			{
				get
				{
					return this;
				}
			}
			public override bool IsInitialized
			{
				get
				{
					return this.result.IsInitialized;
				}
			}
			protected override QContact MessageBeingBuilt
			{
				get
				{
					return this.PrepareBuilder();
				}
			}
			public override QContact DefaultInstanceForType
			{
				get
				{
					return QContact.DefaultInstance;
				}
			}
			public string UserName
			{
				get
				{
					return this.result.UserName;
				}
				set
				{
					this.SetUserName(value);
				}
			}
			public string DisplayName
			{
				get
				{
					return this.result.DisplayName;
				}
				set
				{
					this.SetDisplayName(value);
				}
			}
			public uint ExtInfoSeq
			{
				get
				{
					return this.result.ExtInfoSeq;
				}
				set
				{
					this.SetExtInfoSeq(value);
				}
			}
			public uint ImgUpdateSeq
			{
				get
				{
					return this.result.ImgUpdateSeq;
				}
				set
				{
					this.SetImgUpdateSeq(value);
				}
			}
			public Builder()
			{
				this.result = QContact.DefaultInstance;
				this.resultIsReadOnly = true;
			}
			internal Builder(QContact cloneFrom)
			{
				this.result = cloneFrom;
				this.resultIsReadOnly = true;
			}
			private QContact PrepareBuilder()
			{
				if (this.resultIsReadOnly)
				{
					QContact other = this.result;
					this.result = new QContact();
					this.resultIsReadOnly = false;
					this.MergeFrom(other);
				}
				return this.result;
			}
			public override QContact.Builder Clear()
			{
				this.result = QContact.DefaultInstance;
				this.resultIsReadOnly = true;
				return this;
			}
			public override QContact.Builder Clone()
			{
				if (this.resultIsReadOnly)
				{
					return new QContact.Builder(this.result);
				}
				return new QContact.Builder().MergeFrom(this.result);
			}
			public override QContact BuildPartial()
			{
				if (this.resultIsReadOnly)
				{
					return this.result;
				}
				this.resultIsReadOnly = true;
				return this.result.MakeReadOnly();
			}
			public override QContact.Builder MergeFrom(IMessageLite other)
			{
				if (other is QContact)
				{
					return this.MergeFrom((QContact)other);
				}
				base.MergeFrom(other);
				return this;
			}
			public override QContact.Builder MergeFrom(QContact other)
			{
				return this;
			}
			public override QContact.Builder MergeFrom(ICodedInputStream input)
			{
				return this.MergeFrom(input, ExtensionRegistry.Empty);
			}
			public override QContact.Builder MergeFrom(ICodedInputStream input, ExtensionRegistry extensionRegistry)
			{
				this.PrepareBuilder();
				uint num;
				string text;
				while (input.ReadTag(out num, out text))
				{
					if (num == 0u && text != null)
					{
						int num2 = Array.BinarySearch<string>(QContact._qContactFieldNames, text, StringComparer.get_Ordinal());
						if (num2 < 0)
						{
							this.ParseUnknownField(input, extensionRegistry, num, text);
							continue;
						}
						num = QContact._qContactFieldTags[num2];
					}
					uint num3 = num;
					if (num3 <= 10u)
					{
						if (num3 == 0u)
						{
							throw InvalidProtocolBufferException.InvalidTag();
						}
						if (num3 == 10u)
						{
							this.result.hasUserName = input.ReadString(ref this.result.userName_);
							continue;
						}
					}
					else
					{
						if (num3 == 18u)
						{
							this.result.hasDisplayName = input.ReadString(ref this.result.displayName_);
							continue;
						}
						if (num3 == 24u)
						{
							this.result.hasExtInfoSeq = input.ReadUInt32(ref this.result.extInfoSeq_);
							continue;
						}
						if (num3 == 32u)
						{
							this.result.hasImgUpdateSeq = input.ReadUInt32(ref this.result.imgUpdateSeq_);
							continue;
						}
					}
					if (WireFormat.IsEndGroupTag(num))
					{
						return this;
					}
					this.ParseUnknownField(input, extensionRegistry, num, text);
				}
				return this;
			}
			public QContact.Builder SetUserName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasUserName = true;
				this.result.userName_ = value;
				return this;
			}
			public QContact.Builder ClearUserName()
			{
				this.PrepareBuilder();
				this.result.hasUserName = false;
				this.result.userName_ = "";
				return this;
			}
			public QContact.Builder SetDisplayName(string value)
			{
				ThrowHelper.ThrowIfNull(value, "value");
				this.PrepareBuilder();
				this.result.hasDisplayName = true;
				this.result.displayName_ = value;
				return this;
			}
			public QContact.Builder ClearDisplayName()
			{
				this.PrepareBuilder();
				this.result.hasDisplayName = false;
				this.result.displayName_ = "";
				return this;
			}
			public QContact.Builder SetExtInfoSeq(uint value)
			{
				this.PrepareBuilder();
				this.result.hasExtInfoSeq = true;
				this.result.extInfoSeq_ = value;
				return this;
			}
			public QContact.Builder ClearExtInfoSeq()
			{
				this.PrepareBuilder();
				this.result.hasExtInfoSeq = false;
				this.result.extInfoSeq_ = 0u;
				return this;
			}
			public QContact.Builder SetImgUpdateSeq(uint value)
			{
				this.PrepareBuilder();
				this.result.hasImgUpdateSeq = true;
				this.result.imgUpdateSeq_ = value;
				return this;
			}
			public QContact.Builder ClearImgUpdateSeq()
			{
				this.PrepareBuilder();
				this.result.hasImgUpdateSeq = false;
				this.result.imgUpdateSeq_ = 0u;
				return this;
			}
		}
		public const int UserNameFieldNumber = 1;
		public const int DisplayNameFieldNumber = 2;
		public const int ExtInfoSeqFieldNumber = 3;
		public const int ImgUpdateSeqFieldNumber = 4;
		private static readonly QContact defaultInstance;
		private static readonly string[] _qContactFieldNames;
		private static readonly uint[] _qContactFieldTags;
		private bool hasUserName;
		private string userName_ = "";
		private bool hasDisplayName;
		private string displayName_ = "";
		private bool hasExtInfoSeq;
		private uint extInfoSeq_;
		private bool hasImgUpdateSeq;
		private uint imgUpdateSeq_;
		private int memoizedSerializedSize = -1;
		public static QContact DefaultInstance
		{
			get
			{
				return QContact.defaultInstance;
			}
		}
		public override QContact DefaultInstanceForType
		{
			get
			{
				return QContact.DefaultInstance;
			}
		}
		protected override QContact ThisMessage
		{
			get
			{
				return this;
			}
		}
		public string UserName
		{
			get
			{
				return this.userName_;
			}
		}
		public string DisplayName
		{
			get
			{
				return this.displayName_;
			}
		}
		public uint ExtInfoSeq
		{
			get
			{
				return this.extInfoSeq_;
			}
		}
		public uint ImgUpdateSeq
		{
			get
			{
				return this.imgUpdateSeq_;
			}
		}
		public override bool IsInitialized
		{
			get
			{
				return this.hasExtInfoSeq && this.hasImgUpdateSeq;
			}
		}
		public override int SerializedSize
		{
			get
			{
				int num = this.memoizedSerializedSize;
				if (num != -1)
				{
					return num;
				}
				num = 0;
				if (this.hasUserName)
				{
					num += CodedOutputStream.ComputeStringSize(1, this.UserName);
				}
				if (this.hasDisplayName)
				{
					num += CodedOutputStream.ComputeStringSize(2, this.DisplayName);
				}
				if (this.hasExtInfoSeq)
				{
					num += CodedOutputStream.ComputeUInt32Size(3, this.ExtInfoSeq);
				}
				if (this.hasImgUpdateSeq)
				{
					num += CodedOutputStream.ComputeUInt32Size(4, this.ImgUpdateSeq);
				}
				this.memoizedSerializedSize = num;
				return num;
			}
		}
		private QContact()
		{
		}
		public override void WriteTo(ICodedOutputStream output)
		{
			int arg_06_0 = this.SerializedSize;
			string[] qContactFieldNames = QContact._qContactFieldNames;
			if (this.hasUserName)
			{
				output.WriteString(1, qContactFieldNames[3], this.UserName);
			}
			if (this.hasDisplayName)
			{
				output.WriteString(2, qContactFieldNames[0], this.DisplayName);
			}
			if (this.hasExtInfoSeq)
			{
				output.WriteUInt32(3, qContactFieldNames[1], this.ExtInfoSeq);
			}
			if (this.hasImgUpdateSeq)
			{
				output.WriteUInt32(4, qContactFieldNames[2], this.ImgUpdateSeq);
			}
		}
		public override int GetHashCode()
		{
			int num = base.GetType().GetHashCode();
			if (this.hasUserName)
			{
				num ^= this.userName_.GetHashCode();
			}
			if (this.hasDisplayName)
			{
				num ^= this.displayName_.GetHashCode();
			}
			if (this.hasExtInfoSeq)
			{
				num ^= this.extInfoSeq_.GetHashCode();
			}
			if (this.hasImgUpdateSeq)
			{
				num ^= this.imgUpdateSeq_.GetHashCode();
			}
			return num;
		}
		public override bool Equals(object value)
		{
			QContact qContact = value as QContact;
			return qContact != null && (this.hasUserName == qContact.hasUserName && (!this.hasUserName || this.userName_.Equals(qContact.userName_))) && (this.hasDisplayName == qContact.hasDisplayName && (!this.hasDisplayName || this.displayName_.Equals(qContact.displayName_))) && (this.hasExtInfoSeq == qContact.hasExtInfoSeq && (!this.hasExtInfoSeq || this.extInfoSeq_.Equals(qContact.extInfoSeq_))) && (this.hasImgUpdateSeq == qContact.hasImgUpdateSeq && (!this.hasImgUpdateSeq || this.imgUpdateSeq_.Equals(qContact.imgUpdateSeq_)));
		}
		public override void PrintTo(TextWriter writer)
		{
			GeneratedMessageLite<QContact, QContact.Builder>.PrintField("UserName", this.hasUserName, this.userName_, writer);
			GeneratedMessageLite<QContact, QContact.Builder>.PrintField("DisplayName", this.hasDisplayName, this.displayName_, writer);
			GeneratedMessageLite<QContact, QContact.Builder>.PrintField("ExtInfoSeq", this.hasExtInfoSeq, this.extInfoSeq_, writer);
			GeneratedMessageLite<QContact, QContact.Builder>.PrintField("ImgUpdateSeq", this.hasImgUpdateSeq, this.imgUpdateSeq_, writer);
		}
		public static QContact ParseFrom(byte[] data)
		{
			return QContact.CreateBuilder().MergeFrom(data).BuildParsed();
		}
		private QContact MakeReadOnly()
		{
			return this;
		}
		public static QContact.Builder CreateBuilder()
		{
			return new QContact.Builder();
		}
		public override QContact.Builder ToBuilder()
		{
			return QContact.CreateBuilder(this);
		}
		public override QContact.Builder CreateBuilderForType()
		{
			return new QContact.Builder();
		}
		public static QContact.Builder CreateBuilder(QContact prototype)
		{
			return new QContact.Builder(prototype);
		}
		static QContact()
		{
			QContact.defaultInstance = new QContact().MakeReadOnly();
			QContact._qContactFieldNames = new string[]
			{
				"DisplayName",
				"ExtInfoSeq",
				"ImgUpdateSeq",
				"UserName"
			};
			QContact._qContactFieldTags = new uint[]
			{
				18u,
				24u,
				32u,
				10u
			};
			object.ReferenceEquals(micromsg.Proto.QContact.Descriptor, null);
		}
	}
}
